﻿#include <cusp/blas/SparseMatrix.h>
#include <cusp/blas/blas.h>
#include <gtest/gtest.h>

//#include <vtkm/cont/ArrayHandle.h>

TEST(array1d, fill)
{
  vtkm::cont::ArrayHandle<Real> x;
  x.Allocate(10);
  fill(x, 1);

  EXPECT_EQ(x.ReadPortal().Get(8) == 1, true);
  EXPECT_EQ(x.ReadPortal().Get(0) == 1, true);
  // EXPECT_EQ(1=1);
}
TEST(array1d, mxpy)
{
  //   vtkm::cont::ArrayHandle<FloatDefault> x, y;
  //x.Allocate(10);
  //y.Allocate(10);
  //fill(x, 1);
  //mxpy(x, y    , 1.11);

  //EXPECT_EQ(y.ReadPortal().Get(8) == 3, true);
  // EXPECT_EQ(1=1);
}

TEST(SparseMatrix, Fill)
{

  SparseMatrix m(2);
  m.fill({ 1, 2,3 }, { 1, 1 }, {1.,2.});
}